package api;

import java.io.Serializable;
import java.util.List;

public class Configuration implements Serializable {
//    private DatabaseType db_type;
    private String db_name;  //数据库
    private String benchmark;  //数据集
    private String db_connection;  //连接地址及端口
    private String db_username;  //登录用户名
    private String db_password;  //密码
    private boolean load_data;  //是否重新装载数据到数据库
    private double scaleFactor;  //规模因子
    private int terminals;  //模拟并发连接数量，TPC-C时，最好与scaleFactor相等
    private int rate;  //测试单元（如Q1）执行的上限
    private int time;  //测试时间执行的上限
    private List<Double> weights;  //各个测试单元的数量权重分布
    private List<String> procedures;  //所需的测试单元

    public Configuration() {}

    public Configuration(String db_name, String benchmark, String db_connection,
                         String db_username, String db_password,
                         boolean load_data, int scaleFactor, int terminals,
                         int rate, int time,
                         List<Double> weights, List<String> procedures) {
        this.benchmark = benchmark;
        this.db_connection = db_connection;
        this.db_name = db_name;
        this.db_username = db_username;
        this.db_password = db_password;
        this.load_data = load_data;
        this.scaleFactor = scaleFactor;
        this.terminals = terminals;
        this.rate = rate;
        this.time = time;
        this.weights = weights;
        this.procedures = procedures;
    }


    public boolean getLoad_data() {
        return load_data;
    }

    public void setLoad_data(boolean load_data) {
        this.load_data = load_data;
    }

    public int getRate() {
        return rate;
    }

    public void setRate(int rate) {
        this.rate = rate;
    }

    public String getBenchmark() {
        return benchmark;
    }

    public void setBenchmark(String benchmark) {
        this.benchmark = benchmark;
    }

    public String getDb_connection() {
        return db_connection;
    }

    public void setDb_connection(String db_connection) {
        this.db_connection = db_connection;
    }

    public String getDb_name() {
        return db_name;
    }

    public void setDb_name(String db_name) {
        this.db_name = db_name;
    }

    public String getDb_username() {
        return db_username;
    }

    public void setDb_username(String db_username) {
        this.db_username = db_username;
    }

    public String getDb_password() {
        return db_password;
    }

    public void setDb_password(String db_password) {
        this.db_password = db_password;
    }

    public double getScaleFactor() {
        return scaleFactor;
    }

    public void setScaleFactor(double scaleFactor) {
        this.scaleFactor = scaleFactor;
    }

    public int getTerminals() {
        return terminals;
    }

    public void setTerminals(int terminals) {
        this.terminals = terminals;
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    public List<Double> getWeights() {
        return weights;
    }

    public void setWeights(List<Double> weights) {
        this.weights = weights;
    }

    public List<String> getProcedures() {
        return procedures;
    }

    public void setProcedures(List<String> procedures) {
        this.procedures = procedures;
    }

}
